import re

html = """<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title
    </title></title></title></title>
</head>
<body>
<div>
    <a href="https://www.baidu.com">百度</a>
    <a href="https://www.taobao.com">淘宝</a>
    <a href="https://www.jd.com">京东</a>
</div>
</body>
</html>"""


title = re.search(r"<title>(.*?)</title>",html,re.S)
print(title.group(1))


href = re.findall(r'<a href="(.*?)">(.*?)</a>',html)
for item in href:
    print(f"链接：{item[0]},标题：{item[1]}")
print(href)